package com.yx.changdao.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yx.changdao.common.annotation.AutoFill;
import com.yx.changdao.common.utils.SysUtils;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;


@TableName(WithinLetter.TABLE_NAME)
public class WithinLetter implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据库名
     */
    public static final String TABLE_NAME = "within_letter";

   /**
    * 
    */
    public static final String ID = "id";
   /**
    * 部门id
    */
    public static final String DEP_ID = "dep_id";
   /**
    * 部门名称
    */
    public static final String DEP_NAME = "dep_name";
   /**
    * 标题
    */
    public static final String TITLE = "title";
   /**
    * 内容
    */
    public static final String CONTANT = "contant";
   /**
    * 状态  0：未读   1：已读
    */
    public static final String STATE = "state";
   /**
    * 发送人id
    */
    public static final String SEND_ID = "send_id";
   /**
    * 发送人姓名
    */
    public static final String SEND_NAME = "send_name";
   /**
    * 接收人id
    */
    public static final String RECEIVE_ID = "receive_id";
   /**
    * 接收人姓名
    */
    public static final String RECEIVE_NAME = "receive_name";
    /**
     * 读的时间
     */
    public static final String READ_TIME = "read_time";
    /**
     * 类型
     */
    public static final String TYPE = "type";


    /**
     *
     */
    public static final String CREATE_TIME = "create_time";
    /**
     * 创建人id
     */
    public static final String CREATE_BY = "create_by";
    /**
     * 创建人姓名
     */
    public static final String CREATE_BY_NAME = "create_by_name";
    /**
     * 更新时间
     */
    public static final String UPDATE_TIME = "update_time";
    /**
     * 更新人
     */
    public static final String UPDATE_BY_NAME = "update_by_name";
    /**
     * 更新人id
     */
    public static final String UPDATE_BY = "update_by";


   /**
    * 
    */
    @TableId(type = IdType.AUTO)
    private Integer id;
   /**
    * 部门id
    */
    private Integer depId;
   /**
    * 部门名称
    */
    private String depName;
   /**
    * 标题
    */
   @NotNull(message = "标题不允许为空")
    private String title;
   /**
    * 内容
    */
   @NotNull(message = "内容不允许为空")
    private String contant;
   /**
    * 状态  0：未读   1：已读
    */
    private Integer state;
   /**
    * 发送人id
    */
   @NotNull(message = "发送人不允许为空")
    private String sendId;

    /**
     * 类型
     */
    @NotNull(message = "类型不允许为空")
    private Integer type;
   /**
    * 发送人姓名
    */
    private String sendName;
   /**
    * 接收人id
    */
   @NotNull(message = "接收人不允许为空")
    private String receiveId;
   /**
    * 接收人姓名
    */
    private String receiveName;
    @AutoFill
    @TableField(fill = FieldFill.UPDATE)
    private Date readTime;
    /**
     * 创建时间
     */
    @AutoFill
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 创建人
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserName")
    @TableField(fill = FieldFill.INSERT)
    private String createByName;
    /**
     * 创建人id
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserId")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 更新时间
     */
    @AutoFill
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    /**
     * 更新人
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserName")
    @TableField(fill = FieldFill.UPDATE)
    private String updateByName;
    /**
     * 更新人id
     */
    @AutoFill(klass= SysUtils.class,method = "currentUserId")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    public void setId (Integer id){
        this.id =  id;
    }

    /**
     * 
     */
    public Integer getId(){
        return this.id;
    }
    public void setDepId (Integer depId){
        this.depId =  depId;
    }

    /**
     * 部门id
     */
    public Integer getDepId(){
        return this.depId;
    }
    public void setDepName (String depName){
        this.depName =  depName;
    }

    /**
     * 部门名称
     */
    public String getDepName(){
        return this.depName;
    }
    public void setTitle (String title){
        this.title =  title;
    }

    /**
     * 标题
     */
    public String getTitle(){
        return this.title;
    }
    public void setContant (String contant){
        this.contant =  contant;
    }

    /**
     * 内容
     */
    public String getContant(){
        return this.contant;
    }
    public void setState (Integer state){
        this.state =  state;
    }

    /**
     * 状态  0：未读   1：已读
     */
    public Integer getState(){
        return this.state;
    }
    public void setSendId (String sendId){
        this.sendId =  sendId;
    }

    /**
     * 发送人id
     */
    public String getSendId(){
        return this.sendId;
    }
    public void setSendName (String sendName){
        this.sendName =  sendName;
    }

    /**
     * 发送人姓名
     */
    public String getSendName(){
        return this.sendName;
    }
    public void setReceiveId (String receiveId){
        this.receiveId =  receiveId;
    }

    /**
     * 接收人id
     */
    public String getReceiveId(){
        return this.receiveId;
    }
    public void setReceiveName (String receiveName){
        this.receiveName =  receiveName;
    }

    /**
     * 接收人姓名
     */
    public String getReceiveName(){
        return this.receiveName;
    }
    public void setCreateTime (Date createTime){
        this.createTime =  createTime;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime(){
        return this.createTime;
    }
    public void setCreateBy (String createBy){
        this.createBy =  createBy;
    }

    /**
     * 创建人
     */
    public String getCreateBy(){
        return this.createBy;
    }
    public void setUpdateTime (Date updateTime){
        this.updateTime =  updateTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime(){
        return this.updateTime;
    }
    public void setUpdateBy (String updateBy){
        this.updateBy =  updateBy;
    }

    /**
     * 更新人id
     */
    public String getUpdateBy(){
        return this.updateBy;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Date getReadTime() {
        return readTime;
    }

    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    public String getCreateByName() {
        return createByName;
    }

    public void setCreateByName(String createByName) {
        this.createByName = createByName;
    }

    public String getUpdateByName() {
        return updateByName;
    }

    public void setUpdateByName(String updateByName) {
        this.updateByName = updateByName;
    }
}
